package com.components.bluetooth

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder
import com.components.bluetooth.databinding.ItemBluetoothDeviceBinding

class UserDeviceAdapter(data: MutableList<UserDevice>) :
    BaseQuickAdapter<UserDevice, BaseDataBindingHolder<ItemBluetoothDeviceBinding>>(R.layout.item_bluetooth_device, data) {
    override fun convert(holder: BaseDataBindingHolder<ItemBluetoothDeviceBinding>, item: UserDevice) {
        holder.dataBinding?.apply {
            device = item
            executePendingBindings()
        }
    }
}